package com.duyj.server.order.dao;

import com.duyj.client.order.model.Order;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

public interface OrderDAO {

    @Insert("insert into tp_order(id, user_name, goods_name, goods_code, goods_num, amount) values " +
            "(#{id}, #{userName}, #{goodsName}, #{goodsCode}, #{goodsNumber}, #{amount})")
    void insertOrder(Order order);


    @Select("select id, user_name, goods_name, goods_code, goods_num, amount from tp_order where id = #{id}")
    Order getOrder(Long id);
}
